home *** CD-ROM | disk | FTP | other *** search
/ 100 Plus Great Games 2 / 100PLUSV2.BIN / games / Sultan.dxr / scripts_1_card pile.ls < prev    next >
Encoding:
Text File  |  2002-01-25  |  353 b   |  28 lines

  1. property cards
  2.  
  3. on new me
  4.   me.cards = initcards()
  5.   return me
  6. end
  7.  
  8. on initcards me
  9.   return []
  10. end
  11.  
  12. on addCard me, arg
  13.   me.cards.add(new(script("card"), arg))
  14. end
  15.  
  16. on subcard me, arg
  17.   me.cards[arg] = VOID
  18.   me.cards.deleteAt(me.cards.count)
  19. end
  20.  
  21. on getlastcard me
  22.   return me.cards[me.cards.count]
  23. end
  24.  
  25. on getcardcount me
  26.   return me.cards.count
  27. end
  28.